Optimal. Leaf size=49 \[ -\frac {\cos (c+d x)}{a d}-\frac {\cot (c+d x)}{a d}+\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2839, 3473, 8, 2592, 321, 206} \[ -\frac {\cos (c+d x)}{a d}-\frac {\cot (c+d x)}{a d}+\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 206
Rule 321
Rule 2592
Rule 2839
Rule 3473
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac {\int \cos (c+d x) \cot (c+d x) \, dx}{a}+\frac {\int \cot ^2(c+d x) \, dx}{a}\\ &=-\frac {\cot (c+d x)}{a d}-\frac {\int 1 \, dx}{a}+\frac {\operatorname {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (c+d x)\right )}{a d}\\ &=-\frac {x}{a}-\frac {\cos (c+d x)}{a d}-\frac {\cot (c+d x)}{a d}+\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{a d}\\ &=-\frac {x}{a}+\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {\cos (c+d x)}{a d}-\frac {\cot (c+d x)}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.42, size = 93, normalized size = 1.90 \[ -\frac {\tan \left (\frac {1}{2} (c+d x)\right ) \left (\cot \left (\frac {1}{2} (c+d x)\right )+1\right )^2 \left (\cos (c+d x)+\sin (c+d x) \left (\cos (c+d x)+\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+c+d x\right )\right )}{2 a d (\sin (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.46, size = 80, normalized size = 1.63 \[ -\frac {2 \, {\left (d x + \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 2 \, \cos \left (d x + c\right )}{2 \, a d \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 113, normalized size = 2.31 \[ -\frac {\frac {6 \, {\left (d x + c\right )}}{a} + \frac {6 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} a}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.39, size = 97, normalized size = 1.98 \[ \frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {2}{a d \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {1}{2 a d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.42, size = 154, normalized size = 3.14 \[ -\frac {\frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 1}{\frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}} + \frac {4 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {2 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.72, size = 147, normalized size = 3.00 \[ \frac {2\,\mathrm {atan}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-4}+\frac {4}{4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-4}\right )}{a\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1}{d\,\left (2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{4}{\left (c + d x \right )} \csc ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________